package domain;

import domain.exceptions.CannotFlagSquareException;
import domain.exceptions.CannotPlaceAgentHereException;

/**
 *
 * @author shaigi
 */
public class SquareWall extends Square implements Cloneable {
        
    public SquareWall(int row, int column){
        setRow(row);
        setColumn(column);
        try {
			setFlag(null);
		} catch (CannotFlagSquareException e) {
			e.printStackTrace();
		}
    }
    
    public SquareWall(SquareWall other){
        setRow(other.getRow());
        setColumn(other.getColumn());
        try {
			setFlag(null);
		} catch (CannotFlagSquareException e) {
			e.printStackTrace();
		}
    }
    
    @Override
    public String toString(){
        return "Wall Square " + toStringLocation();
    }

    @Override
    public void placeAgent(Agent agent) throws CannotPlaceAgentHereException {
        throw new CannotPlaceAgentHereException();
    }
    
    
    public void setFlag(Flag flag) throws CannotFlagSquareException{
        if ( flag != null )
            throw new CannotFlagSquareException("Cannot flag a Wall square");
    }
    //TODO: Fix Square Wall Clone
//    @Override
//    public SquareWall clone(){
//        return 
//    }
}
